package com.woniu.maintain.service.impl;

import com.woniu.common.entity.JpMalfunction;
import com.woniu.maintain.dao.JpMalfunctionDao;
import com.woniu.maintain.service.JpMalfunctionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 啊川
 * @version 1.0
 * @date 2021/9/16 21:54
 * @QQ 836782490
 * @content:
 */
@Service
public class JpMalfunctionServicerImpl implements JpMalfunctionService {

    @Resource
    private JpMalfunctionDao jpMalfunctionDao;

    @Override
    public List<JpMalfunction> findAll() {
        return jpMalfunctionDao.findAll();
    }

    @Override
    public Boolean add(JpMalfunction jpMalfunction) {
        return jpMalfunctionDao.insert(jpMalfunction)==0?false:true;
    }

    @Override
    public boolean save(JpMalfunction malfunction) {
        return false;
    }

    @Override
    public Long getLastInsertId() {
        return jpMalfunctionDao.getLastInsertId();
    }

    @Override
    public JpMalfunction findById(Integer id) {
        return jpMalfunctionDao.findById(id);
    }


}
